import com.nanhang.entity.Student;
import com.nanhang.service.StudentService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class test {
    public static void main(String[] args) {


        ApplicationContext context = new ClassPathXmlApplicationContext("spring/applicationContext.xml");

        // 从 Spring 应用上下文中获取 StudentService 的实例
        StudentService studentService = context.getBean(StudentService.class);
        Student s =  new Student(2108,"小张","男",21,"深圳",21,"21班");
        studentService.save(s);
//        System.out.println(studentService.deletes(2108));
    }
}